#include<iostream>
#include<unistd.h>
#include<memory>
#include"select.hpp"
using namespace std;

static void Usage(string proc)
{
    cerr<<"Usage:\n\t"<<proc<<" port "<<"\n\n";
}

string resp(const string& s)
{
    return s;
}

int main(int argc,char* argv[])
{
    if(argc!=2)
    {
        Usage(argv[0]);
        exit(USAGE_ERR);
    }

    unique_ptr<SelectServer> selsv(new SelectServer(atoi(argv[1])));
    selsv->initserver();
    selsv->start();
    
    return 0;
}